home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-10-30 | 8.5 KB | 253 lines |
-
- # We would like you to use Bison instead of Yacc since some
- # versions of Yacc cannot handle reentrant parsing. Unfortunately,
- # this includes the Yacc currently being shipped with SunOS4.x.
- # If you do use Yacc, please make sure that any bugs in parsing
- # are not really manifestations of Yacc bugs before you report
- # them.
-
- # Can be overidden on invocation.
- MAKE = make -f Makefile.cross
- DESTDIR = .
-
- # Here is a rule for making .o files from .c files that does not
- # force the type of the machine (like -"sparc") into the flags.
- .c.o:
- $(RM) $@
- $(CC) -c -o $*.o $(CFLAGS) $(CPPFLAGS) $*.c
-
- BISON = bison -y
- CC = cgcc
-
- # Of course, you cannot do this the first time through...
- SHELL=bash
-
- RM = rm -f
- AR = car
- MACHINE = "atari"
- OS = TOS
-
- # PROFILE_FLAGS is either -pg, to generate profiling info for use
- # with gprof, or nothing (the default).
- PROFILE_FLAGS=
-
-
- # This system has some peculiar flags that must be passed to the
- # the C compiler (or to cpp).
- # SYSDEP = -DBSD_GETPGRP
-
- # This system has the setlinebuf () call.
- # LINEBUF = -DHAVE_SETLINEBUF
-
- # This system has the vprintf () and vfprintf () calls.
- VPRINTF = -DHAVE_VPRINTF
-
- # This system has <unistd.h>.
- UNISTD = -DHAVE_UNISTD_H
-
- # This system has multiple groups.
- # GROUPS = -DHAVE_MULTIPLE_GROUPS
-
- # This system has <sys/resource.h>
- RESOURCE = -DHAVE_RESOURCE
-
- # This system's signal () call returns a pointer to a function returning
- # void. The signal handlers themselves are thus void functions.
- SIGHANDLER = -DVOID_SIGHANDLER
-
- # This system has <sys/wait.h>
- # WAITH = -DHAVE_WAIT_H
-
- # This system has the getwd () call.
- # GETWD = -DHAVE_GETWD
-
- # This system has a working version of dup2 ().
- DUP2 = -DHAVE_DUP2
-
- SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
- $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
- -D$(MACHINE) -D$(OS)
-
- DEBUG_FLAGS = $(PROFILE_FLAGS)
- LDFLAGS = $(SYSDEP_LD) $(DEBUG_FLAGS) -s
-
- CFLAGS = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS) \
- -O -fstrength-reduce -fomit-frame-pointer
-
- CPPFLAGS = -I$(LIBSRC)
-
- LIBRARY_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
- $(SYSDEP) -D$(MACHINE) -D$(OS) $(UNISTD) -DSHELL
-
- # These are required for sending bug reports.
- SYSTEM_NAME = $(MACHINE)
- OS_NAME = $(OS)
-
- # The name of this program.
- PROGRAM = bash.ttp
-
- # The type of machine Bash is being compiled on.
- HOSTTYPE_DECL = -DHOSTTYPE='$(SYSTEM_NAME)'
-
- bash_maintainer = scott@sparc1.stevens-tech.edu
- MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
-
- # The group of configuration flags. These are for shell.c
- CFG_FLAGS = -DOS_NAME='"$(OS_NAME)"' -DSYSTEM_NAME='$(SYSTEM_NAME)' \
- $(SIGLIST_FLAG) $(MAINTAIN_DEFINE)
-
- # The directory which contains the source for malloc. The name must
- # end in a slash, as in "./lib/malloc/".
- ALLOC_DIR = ../lib/malloc/
-
- # Our malloc.
- ALLOCA_H_DEFINE = -DHAVE_ALLOCA_H
- ALLOCA_DEFINE = -DHAVE_ALLOCA
- ALLOCA_CFLAGS = $(ALLOCA_DEFINE) $(ALLOCA_H_DEFINE)
- ALLOC_HEADERS = $(ALLOC_DIR)getpagesize.h
- ALLOC_FILES = $(ALLOC_DIR)malloc.c $(ALLOC_DIR)alloca.c $(ALLOC_DIR)xmalloc.c
- # The location of ranlib on your system.
- RANLIB = car
-
- # Support for the libraries required. Termcap, Glob, and Readline.
- # The location of sources for the support libraries.
- LIBSRC = ../lib/
-
- # You wish to compile with the line editing features installed.
- READLINE_LIB = -lreadline
- TERMCAP_LIB = -ltermcap
- GLOB_LIB = -lglob
-
- # The source and object of the bash<->readline interface code.
- RL_SUPPORT_SRC = bashline.c
- RL_SUPPORT_OBJ = bashline.o
-
- RLIBSRC = ../lib/readline/
-
- # The order is important. Most dependent first.
- LIBRARIES = $(READLINE_LIB) $(TERMCAP_LIB) $(GLOB_LIB) $(LOCAL_LIBS)
-
- BUILTINS_LIB = builtins/builtins.olb
-
- # The main source code for the Bourne Again SHell.
- CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \
- dispose_cmd.c execute_cmd.c variables.c $(GLOBC) version.c \
- expr.c copy_cmd.c flags.c subst.c hash.c mailcheck.c \
- test.c trap.c jobs.c nojobs.c $(ALLOC_FILES) braces.c \
- unwind_prot.c siglist.c lib+/lib-plus.c $(RL_SUPPORT_SRC)
-
- HSOURCES = shell.h flags.h trap.h hash.h jobs.h builtins.h alias.c y.tab.h \
- general.h variables.h config.h $(ALLOC_HEADERS) alias.h maxpath.h \
- quit.h machines.h posixstat.h filecntl.h unwind_prot.h
-
- SOURCES = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS)
-
- # Matching object files.
- OBJECTS = shell.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \
- dispose_cmd.o execute_cmd.o variables.o copy_cmd.o \
- expr.o flags.o jobs.o subst.o hash.o mailcheck.o test.o \
- trap.o alias.o $(MALLOC) $(ALLOCA) braces.o unwind_prot.o \
- $(SIGLIST) version.o $(RL_SUPPORT_OBJ) $(BUILTINS_LIB) \
- lib+/lib-plus.o
-
- # Where the source code of the shell builtins resides.
- DEFDIR = builtins/
- BUILTIN_DEFS = $(DEFDIR)alias.def $(DEFDIR)bind.def $(DEFDIR)break.def \
- $(DEFDIR)builtin.def $(DEFDIR)cd.def $(DEFDIR)colon.def \
- $(DEFDIR)command.def $(DEFDIR)declare.def \
- $(DEFDIR)echo.def $(DEFDIR)enable.def $(DEFDIR)eval.def \
- $(DEFDIR)exec.def $(DEFDIR)exit.def $(DEFDIR)fc.def \
- $(DEFDIR)fg_bg.def $(DEFDIR)hash.def $(DEFDIR)help.def \
- $(DEFDIR)history.def $(DEFDIR)jobs.def $(DEFDIR)kill.def \
- $(DEFDIR)let.def $(DEFDIR)read.def $(DEFDIR)return.def \
- $(DEFDIR)set.def $(DEFDIR)setattr.def $(DEFDIR)shift.def \
- $(DEFDIR)source.def $(DEFDIR)suspend.def $(DEFDIR)test.def \
- $(DEFDIR)times.def $(DEFDIR)trap.def $(DEFDIR)type.def \
- $(DEFDIR)ulimit.def $(DEFDIR)umask.def $(DEFDIR)wait.def \
- $(DEFDIR)getopts.def $(DEFDIR)reserved.def
-
- BUILTIN_C_CODE = $(DEFDIR)mkbuiltins.c $(DEFDIR)common.c \
- $(DEFDIR)hashcom.h $(GETOPT_SOURCE)
-
- BUILTIN_SUPPORT = $(DEFDIR)Makefile.cross $(DEFDIR)ChangeLog $(PSIZE_SOURCE) \
- $(BUILTIN_C_CODE)
-
-
- $(PROGRAM): .build $(OBJECTS) $(LIBDEP)
- $(RM) $@
- $(CC) $(LDFLAGS) $(READLINE_LDFLAGS) $(GLOB_LDFLAGS) \
- -o $(PROGRAM) $(OBJECTS) $(LIBRARIES)
-
- .build: $(SOURCES)
- @echo
- @echo " ***************************************************"
- @echo " * *"
- @echo " * Making Bash-1.10 for a $(MACHINE) running $(OS)."
- @echo " * *"
- @echo " ***************************************************"
- @echo
-
- y.tab.c: parse.y shell.h
- $(BISON) -d parse.y
-
- y.tab.h: parse.y shell.h
- $(BISON) -d parse.y
-
- version.o: version.h version.c
-
- shell.o: shell.h flags.h shell.c posixstat.h filecntl.h endian.h
- $(CC) $(CFG_FLAGS) $(CFLAGS) $(CPPFLAGS) -c shell.c
-
- variables.o: shell.h hash.h flags.h variables.h variables.c
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(HOSTTYPE_DECL) variables.c
-
- builtins/builtins.olb: $(BUILTIN_DEFS) $(BUILTIN_C_CODE)
- ( cd $(DEFDIR); $(MAKE) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS) '$(LIBINC_USAGE)' -I.' LDFLAGS='$(LDFLAGS)' RANLIB=$(RANLIB) AR=$(AR) CC=$(CC) DIRECTDEFINE='-D '$(DEFDIR) $(MFLAGS))
-
- shell.h: general.h variables.h config.h quit.h
- jobs.h: endian.h quit.h
- variables.h: hash.h
- braces.o: general.h
- copy_cmd.o: shell.h hash.h
- copy_cmd.o: general.h variables.h config.h quit.h
- dispose_cmd.o: shell.h
- dispose_cmd.o: general.h variables.h config.h quit.h
- execute_cmd.o: shell.h y.tab.h posixstat.h flags.h jobs.h
- execute_cmd.o: general.h variables.h config.h quit.h hash.h endian.h
- execute_cmd.o: unwind_prot.h
- expr.o: shell.h hash.h
- expr.o: general.h variables.h config.h quit.h
- flags.o: flags.h config.h general.h quit.h
- general.o: shell.h maxpath.h
- general.o: general.h variables.h config.h quit.h
- hash.o: shell.h hash.h
- hash.o: general.h variables.h config.h quit.h
- jobs.o: shell.h hash.h trap.h jobs.h
- jobs.o: general.h variables.h config.h endian.h quit.h
- mailcheck.o: posixstat.h maxpath.h variables.h
- mailcheck.o: hash.h quit.h
- make_cmd.o: shell.h flags.h
- make_cmd.o: general.h variables.h config.h quit.h
- y.tab.o: shell.h flags.h maxpath.h
- y.tab.o: general.h variables.h config.h quit.h
- print_cmd.o: shell.h y.tab.h
- print_cmd.o: general.h variables.h config.h quit.h
- shell.o: shell.h flags.h
- shell.o: general.h variables.h config.h quit.h
- subst.o: shell.h flags.h alias.h jobs.h
- subst.o: general.h variables.h config.h endian.h quit.h
- test.o: posixstat.h
- trap.o: trap.h shell.h hash.h unwind_prot.h
- trap.o: general.h variables.h config.h quit.h
- unwind_prot.o: config.h general.h unwind_prot.h
-
- bashline.o: shell.h hash.h builtins.h
- bashline.o: general.h variables.h config.h quit.h alias.h
-
- bashline.o: $(RLIBSRC)chardefs.h $(RLIBSRC)history.h $(RLIBSRC)readline.h
- bashline.o: $(RLIBSRC)keymaps.h $(RLIBSRC)history.h
- y.tab.o: $(RLIBSRC)keymaps.h $(RLIBSRC)chardefs.h $(RLIBSRC)history.h
- y.tab.o: $(RLIBSRC)readline.h
- subst.o: $(RLIBSRC)history.h
-
-